<script setup>
const props = defineProps({
    name: {
        type: String,
        required: true,
    },
    size: {
        type: [String, Number],
        default: '',
    },
})

const symbolId = computed(() => `#${props.name}`)

const styles = computed(() => {
    let currentSize = props.size
    if (typeof props.size === 'number') {
        currentSize = props.size + 'px'
    }
    return {
        fontSize: currentSize,
    }
})
</script>

<template>
    <svg :style="styles" class="arco-icon icon">
        <use :xlink:href="symbolId"  fill="currentColor"/>
    </svg>
</template>

<style lang="scss" scoped>

</style>
